home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16083 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: news.nyu.edu!schonberg!dewar
  2. From: dewar@cs.nyu.edu (Robert Dewar)
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu
  4. Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada)
  5. Date: 9 Apr 1996 08:53:04 -0400
  6. Organization: Courant Institute of Mathematical Sciences
  7. Message-ID: <dewar.829054330@schonberg>
  8. References: <JSA.96Feb16135027@organon.com> <dewar.828936837@schonberg> <828964950snz@genesis.demon.co.uk> <dewar.828987544@schonberg> <4kcein$mev@solutions.solon.com>
  9. NNTP-Posting-Host: schonberg.cs.nyu.edu
  10. X-Newsreader: NN version 6.5.0 (NOV)
  11.  
  12. I said
  13.  
  14. >>Can you quote the relevant standard. No description of read I ever saw
  15. >>was detailed or precise enough to say what the requirements on the caller
  16. >>are.
  17.  
  18. Peter said
  19.  
  20. >If it is not specified, it's undefined.  At least, that's how C does it;
  21. >no guarantees for POSIX.
  22.  
  23. Robert replies
  24.  
  25. OK, "it" here is any specification of how long the buffer should be. So
  26. Peter considers it undefined, in which case *any* call to read is
  27. undefined. Actually I completely agree, if the spec of a routine is
  28. incomplete or imprecise, the routine cannot be called without generating
  29. undefined behavior.
  30.  
  31. But in the absence of Kazimir to tell us the "unwritten" rules, isn't it
  32. just possible that this *might* lead to portability problems :-) Of course
  33. by Peter's rules, we can't call read at all :-)
  34.  
  35. Peter do you have SPEC1170, I assume you must have a copy, so can you
  36. see there if the spec is any more illuminating?
  37.  
  38.